import request from '@/utils/request'

// 今日生产中订单-分页查询
export function getOrderList(query) {
  return request({
    url: '/service/concrete/get-order-list',
    method: 'get',
    params: query
  })
}

// 今日生产调度统计信息
export function produceStats(query) {
    return request({
      url: '/service/concrete/produce-stats',
      method: 'get',
      params: query
    })
  }

// 获取车辆调度信息
export function scheduling() {
    return request({
      url: '/service/cars/scheduling',
      method: 'get'
    })
  }
  
// 批量修改客户订单
export function updateOrders(data) {
    return request({
      url: '/service/orders/edit',
      method: 'put',
      data: data
    })
  }


  // 匹配车辆
export function autoMatch(data) {
    return request({
      url: '/service/concrete/auto-match?orderIds=' + data.join(","),
      method: 'post'
    })
  }

    // 移除砼车匹配
export function removeMatch(data) {
    return request({
      url: '/service/concrete/remove-match?orderIdList=' + data.join(","),
      method: 'post'
    })
  }
  // 新增砼单-发砼
export function addConcrete(data) {
  return request({
    url: `/service/concrete`,
    method: "post",
    data
  });
}